# load afgoogletrend into the workspace first
load("afgoogletrend.RData")

# plot google trends for Afghanistan
ggplot(afgoogletrend, aes(x = Date, y = Afghanistan, group = 1)) + 
  geom_path(size = 2, color = "slateblue4") +
  ylim(0,100) +
  xlab("Date") +
  ylab("Interest in Afghanistan") +
  theme_light(base_size = 40) +
  theme(axis.text.x = element_text(face="bold", 
                                   size=14, angle=90)) +
  annotate("text", x="2021-07-11", y=100, label= "Taliban Takeover ->", size = 10)

# load afgcomp into the workspace first and create long data 
load("afgcomp.RData")
test <- pivot_longer(afgcomp,  cols = c(Afghanistan, Haiti, Ronaldo, Water, Tiktok))


# plot google trends for Afghanistan in comparison
ggplot(test, aes(x = Week, y = value, color = name, group = name)) + 
  geom_path(size = 3) +
  ylim(0,100) +
  xlab("Date") +
  ylab("Relative Interest") +
  theme_light(base_size = 40) +
  theme(axis.text.x = element_text(face="bold", 
                                   size=14, angle=90)) +
  annotate("text", x="2021-06-28", y=97, label= "Taliban Takeover ->", size = 10)
